package com.hhit.zhgd.service.impl

import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import com.hhit.zhgd.dao.ErrorLogMapper
import com.hhit.zhgd.domain.entity.ErrorLog
import com.hhit.zhgd.service.ErrorLogService
import org.springframework.stereotype.Service

@Service("errorLogService")
class ErrorLogServiceImpl : ServiceImpl<ErrorLogMapper, ErrorLog>(), ErrorLogService {
    override fun save(url: String, method: String, params: String, message: String, exception: String) {
        val errorLog = ErrorLog(url = url, method = method, params = params, message = message, exception = exception)
        this.save(errorLog)
    }

    override fun getList(page: Page<ErrorLog>, params: HashMap<String, Any?>): Page<HashMap<String, Any?>> {
        return baseMapper.getList(page, params)
    }
}